<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../引入vue2.js"></script>
</head>

<body>
    <div id="app">
        {{count}}

        <button @click="count++">add 1 表达式</button>
        <!-- 无参可以省略小括弧 -->
        <button @click="add2">add 2 函数表达式</button>

        <!-- $event 固定写法 -->
        <button @click="add3($event,1,2,3)">add 3 函数名</button>
    </div>
</body>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            count: 1
        },
        methods: {
            add2(evt) {
                this.count++;
                console.log(evt.target);
            },
            add3(evt, a, b, c) {
                this.count++;
                console.log(evt.target, a, b, c);
            }
        },
    })
</script>

</html>